//
//  ViewController.m
//  HideStatusBarDemo
//
//  Created by lg on 31/10/2019.
//  Copyright © 2019 lg. All rights reserved.
//

#import "ViewController.h"
#import "UIViewController+LGStatusBarManager.h"


@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)click:(UISegmentedControl *)sender {
    if (sender.selectedSegmentIndex == 0) {
        //Show
//        [[LGStatusBarManager sharedInstance] setStatusBarHidden:NO];
        self.lg_statusBarHidden = NO;
//        [[StatusViewController sharedInstance] setStatusBarHidden:NO];
//        [[UIApplication sharedApplication] setStatusBarHidden:NO];
    } else {
        //Hide
//        [[LGStatusBarManager sharedInstance] setStatusBarHidden:YES];
        self.lg_statusBarHidden = YES;
//        [[StatusViewController sharedInstance] setStatusBarHidden:YES];
//        [[UIApplication sharedApplication] setStatusBarHidden:YES];
    }
}

- (IBAction)click2:(UISegmentedControl *)sender {
    if (sender.selectedSegmentIndex == 0) {
        //Show
//        [[LGStatusBarManager sharedInstance] setStatusBarHidden:NO];
        self.lg_enableStatusBarManager = NO;
//        [[StatusViewController sharedInstance] setStatusBarHidden:NO];
//        [[UIApplication sharedApplication] setStatusBarHidden:NO];
    } else {
        //Hide
//        [[LGStatusBarManager sharedInstance] setStatusBarHidden:YES];
        self.lg_enableStatusBarManager = YES;
//        [[StatusViewController sharedInstance] setStatusBarHidden:YES];
//        [[UIApplication sharedApplication] setStatusBarHidden:YES];
    }
}

//- (BOOL)prefersStatusBarHidden {
////    return self.lg_statusBarHidden;
//    return [super prefersStatusBarHidden];
//}
@end
